package com.intelligentclass.entity;

import jakarta.persistence.*;

import java.util.List;

@Entity
public class Teacher {

    @Id
    private String tno;

    private String tname;
    private String password;

    @OneToMany(mappedBy = "tno", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    private List<Teaching> teachingList;

    public Teacher(){}

    public Teacher(String tno, String tname, String password) {
        this.tno = tno;
        this.tname = tname;
        this.password = password;
    }

    public String getTno() {
        return tno;
    }
    public void setTno(String tno) {
        this.tno = tno;
    }
    public String getTname() {
        return tname;
    }
    public void setTname(String tname) {
        this.tname = tname;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public List<Teaching> getTeachingList() {
        return teachingList;
    }
    public void setTeachingList(List<Teaching> teachingList) {
        this.teachingList = teachingList;
    }
}
